package la.iok.hzsvn.lewin.movie.operation.mapper;

import la.iok.hzsvn.lewin.movie.operation.entity.LuckyMoney;
import la.iok.hzsvn.lewin.mybatis.mapper.BaseMapper;
import la.iok.hzsvn.share.annotations.NotNull;
import la.iok.hzsvn.share.annotations.NotNullElement;
import la.iok.hzsvn.share.annotations.Nullable;

import java.util.Collection;
import java.util.Date;
import java.util.List;

public interface LuckyMoneyMapper extends BaseMapper<LuckyMoney> {

    LuckyMoney returnMoney(@NotNull Long roomId, @NotNull Date now);

    List<LuckyMoney> returnMoneyList(@NotNull @NotNullElement Collection<Long> roomIds, @NotNull Date now);

    int use(Long id, Integer amount, int cost);

    List<LuckyMoney> list(@NotNull String orderColumn, @NotNull String order, @Nullable @NotNullElement List<Long> orgUnitIds,
                          @Nullable Long orgUnitId, @Nullable Long roomId, @Nullable Date start, @Nullable Date end);
}
